<template>
  <a-config-provider :locale="locale">
    <div id="app">
      <router-view/>
    </div>
  </a-config-provider>
</template>
<script>
import zhCN from 'ant-design-vue/lib/locale-provider/zh_CN'
import enquireScreen from '@/utils/device'

export default {
  data() {
    return {
      locale: zhCN,
    }
  },
  created() {
    let that = this
    enquireScreen(deviceType => {
      // tablet
      if (deviceType === 0) {
        that.$store.commit('TOGGLE_DEVICE', 'mobile')
        that.$store.dispatch('setSidebar', false)
      }
      // mobile
      else if (deviceType === 1) {
        that.$store.commit('TOGGLE_DEVICE', 'mobile')
        that.$store.dispatch('setSidebar', false)
      } else {
        that.$store.commit('TOGGLE_DEVICE', 'desktop')
        that.$store.dispatch('setSidebar', true)
      }

    })
  }
}
</script>
<style>
#app {
  height: 100%;
}

.ant-menu-item::after {
  right: 204px !important;
  left: 0 !important;
  border-right: 3px solid #1D79FA !important;
}

body {
  font-family: Microsoft YaHei !important;
}

/*.ant-menu-item-selected{*/
/*  background: linear-gradient(90deg, #0057E7, #FFFFFF);*/
/*  opacity: 0.14;*/
/*}*/
.ant-menu-item-selected > a, .ant-menu-item-selected > a:hover {
  color: #1D79FA !important;
}

.ant-menu-submenu-selected {
  color: #1D79FA !important;
}

.ant-menu-item > a:hover {
  color: #1D79FA !important;
}

.ant-menu-submenu-title:hover {
  color: #1D79FA !important;
}

.ant-tabs-tab-active {
  color: #1D79FA !important;
  border-color: #1D79FA !important;
}

.ant-tabs-ink-bar {
  background-color: #1D79FA !important;
}

.ant-radio-checked .ant-radio-inner {
  border-color: #1D79FA !important;
}

.ant-radio-inner::after {
  background-color: #1D79FA !important;
}
.ant-pagination-item-active a{
  color: #1D79FA !important;
}
.ant-pagination-item-active{
  border-color: #1D79FA !important;
}
.ant-tabs-nav .ant-tabs-tab:hover{
  color: #1D79FA !important;
}
.ant-table-bordered .ant-table-thead > tr > th, .ant-table-bordered .ant-table-tbody > tr > td{
  border-right: 1px solid #DDDCE2 !important;
}
.ant-table-thead > tr > th{
  border-bottom: 1px solid #DDDCE2 !important;
}
.ant-table-tbody > tr > td{
  border-bottom: 1px solid #DDDCE2 !important;
}
.ant-select-selection{
  border: 1px solid #CED4DA !important;
}
.ant-input{
  border: 1px solid #CED4DA !important;
}
.ant-select-focused .ant-select-selection, .ant-select-selection:focus, .ant-select-selection:active{
  box-shadow: 0 0 0 0px rgb(32 73 197 / 20%) !important;
}
.main{
  border-radius: 4px;
}
</style>